import React, { Component } from 'react'
import Zi from './Narbar/zi'
export default class App extends Component {
    state = {
        text: 'sss'
    }
    render() {
        return (
            <div>
                <div>受控绑定原理  双向绑定input</div>
                <input type='text' value={this.state.text} onChange={(event) => {
                    this.setState({ text: event.target.value })
                }}></input>
                <Zi event={() => {
                    console.log('子传父 点击执行')
                }} />
            </div>
        )
    }
}
